The introduction of eXtensible Markup Language (XML) and the EXtensibleStylesheet Language (XSL) specifications has provided an easy way to transform documents between various formats. This functionality has been included into Web development frameworks enabling them to automatically transform an XML file into a document with different format, such as HTML or XHTML, and integrate the original data with a graphic layout and user interface parts.
This transformation process is based on the following basic scheme. Each URL on a website is associated to a single XML file and to one or more XSL style sheets. The associated XML file and XSL style sheet(s) include the transformation rules used to customize the webpage into a desired format.
An example of a prior art method for transforming and rendering a single document is illustrated in FIG. 2. In step 100, a server receives an HTTP request. In step 102, the server extracts the parts from the PATH and QUERY fields in the HTTP request to identify and obtain the document to be processed.
In step 104, the server determines whether the extracted parts in the PATH and QUERY fields of the HTTP request match an XML source for the document to be processed. If in step 104 the server determines the extracted parts in the PATH and QUERY fields of the HTTP request do not have an association with an XML source, then the No branch is taken to step 106. In step 106, the server generates an error page document. In step 108 the server returns the generated error page document in an HTTP response to the HTTP request.
If in step 104 the server determines the extracted parts in the PATH and QUERY fields of the HTTP request do have an association with an XML source for the document to be processed, then the Yes branch is taken to step 110. In step 110, the server obtains the document to be processed from the XML source and generates an XML document.
In step 112, the server determines whether the extracted parts in the PATH and QUERY fields of the HTTP request match one of one or more stored XML processors. If in step 112 the server determines the extracted parts in the PATH and QUERY fields of the HTTP request do not match one of one or more stored XML processors, then the No branch is taken to step 114. In step 114, the server converts the XML document into a desired format. Next, in step 108 the returns the converted XML document in an HTTP response to the HTTP request.
If in step 112 the server determines the extracted parts in the PATH and QUERY fields of the HTTP request do match one or more stored of the XML processors, then the Yes branch is taken to step 116. In step 116, the server runs the one or more matching XML processors on the previously generated XML document. In step 114, the server converts the processed XML document into a desired format. Next, in step 108 the server returns the converted XML document in an HTTP response to the HTTP request.
Referring to FIG. 3, an exemplary prior art fragment of a sitemap.xmap document which is a configuration file of Apache Cocoon is illustrated. This fragment has two sets of prior art instructions to process documents.
The first set of instructions executed starts with XML element <map:match pattern=””> and matches the document with an empty component in the PATH field that is the home page of a site (for example www.sample.com). The document is obtained by loading the XML file “welcome.xml” as the document or other file to be processed, then applying the XSL transformation described in welcome.xsl using XHTML format to return it to the browser because of the <map:serialize> instruction.
The second set of instructions matches an entire set of web site pages: all pages whose PATH field starts with “static-site/” and ends with a name followed by “.xml” extension (for example, www.sample.com/static-site/news.xml). The first instruction loads the corresponding documents or other files from the xdocs directory (for example xdocs/news.xml). The second instruction applies an XSL transformation using one or more identified matching XML processors that transforms the original xml document into an HTML document adding web site user interface (web site navigation links, site logo etc). The last instruction returns the document to the browser in HTML format.
Accordingly, as illustrated and described above, the prior art provides methods for transforming and rendering documents. Unfortunately, these transformation rules currently can not be utilized in an effective and efficient manner by a document transformation server in a single application instance to transform multiple documents from multiple websites.